import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/page/auth/login'
import Register from '@/page/auth/register'
import ForgetPwd from '@/page/auth/forgetPwd'
import ResetPwd from '@/page/auth/resetPwd'
import ResetPayPwd from '@/page/auth/resetPayPwd'
import SetPayPwd from '@/page/auth/setPayPwd'
import Home from '@/page/home/index'
import Mine from '@/page/mine/index'
import UserInfo from '@/page/mine/info'
import UserIcon from '@/page/mine/icon'
import Substitute from '@/page/mine/substitute'
import UpdateRealInfo from '@/page/mine/updateRealInfo'
import Invitation from '@/page/invitation/index'
import InvitationFriend from '@/page/invitation/friend'
import InvitationQrCode from '@/page/invitation/qrCode'
import Financing from '@/page/pay/financing'
import DepositList from '@/page/pay/depositList'
import TransferList from '@/page/pay/transferList'
import PayCenter from '@/page/pay/PayCenter'
import PayList from '@/page/pay/PayList'
import PayOnline from '@/page/pay/PayOnline'
import ProductInfo from '@/page/product/info'
import ProductContent from '@/page/product/productInfo'
import productPay from '@/page/product/productPay'
import repurchase from '@/page/lock/repurchase'
import lockCabin from '@/page/lock/lockCabin'
import hac from '@/page/lock/hac'
import cash from '@/page/lock/cash'
import mmTransfer from '@/page/pay/mmTransfer'
import candeal from '@/page/pay/candeal'
import alreadyfng from '@/page/pay/alreadyfng'
import tfree from '@/page/pay/tfree'

import repurchaseRecharge from '@/page/pay/repurchaseRecharge'
import AHistory from '@/page/lock/aHistory'
import canTransgerLog from '@/page/pay/canTransgerLog'
import alreadyfnglog from '@/page/pay/alreadyfnglog'
import tfreelog from '@/page/pay/tfreelog'
import ngtnumber from '@/page/pay/ngtnumber'
import exchangelog from '@/page/pay/exchangelog'
import mmTransgerLog from '@/page/pay/mmTransgerLog'
import haclock from '@/page/lock/haclock'


import { Button } from 'vant';
import { Icon } from 'vant';
import { Swipe, SwipeItem ,ActionSheet,Field} from 'vant';

Vue.use(Router)
Vue.use(Button)
Vue.use(Icon)
Vue.use(Swipe).use(SwipeItem);
Vue.use(ActionSheet);


export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home,
      describe: '主页',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
    },

    {
      path: '/login',
      name: 'Login',
      component: Login,
      meta: {
        clearToken: true, // 判断是否需要登录
      },
      describe: '登录页面',
    },

    {
      path: '/register',
      name: 'Register',
      component: Register,
      meta: {
        clearToken: true, // 判断是否需要登录
      },
      describe: '注册页面',
    },

    {
      path: '/set-pay-pwd',
      name: 'SetPayPwd',
      component: SetPayPwd,
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      describe: '设置支付密码',
    },
    {
      path: '/lock/haclock',
      name: 'haclock',
      component: haclock,
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      describe: 'hac待释放',
    },


    {
      path: '/pay/repurchase',
      name: 'SetRepurchase',
      component: repurchaseRecharge,
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      describe: '代入充值',
    },
    {
      path: '/pay/mmtransfer',
      name: 'mmTransfer',
      component: mmTransfer,
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      describe: '理财ngt转账',
    },
    {
      path: '/pay/candeal',
      name: 'candeal',
      component: candeal,
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      describe: '可处理ngt转账',
    },

    {
      path: '/pay/tfree',
      name: 'tfree',
      component: tfree,
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      describe: 't释放ngt转账',
    },

    {
      path: '/pay/canTransgerLog',
      name: 'canTransgerLog',
      component: canTransgerLog,
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      describe: '可交易ngt转账记录',
    },

    {
      path: '/pay/alreadyfnglog',
      name: 'alreadyfnglog',
      component: alreadyfnglog,
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      describe: '已经释放ngt转账记录',
    },

    {
      path: '/pay/tfreelog',
      name: 'tfreelog',
      component: tfreelog,
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      describe: 't已经释放ngt转账记录',
    },


    {
      path: '/pay/ngtnumber',
      name: 'ngtnumber',
      component: ngtnumber,
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      describe: 'ngt总数',
    },
    {
      path: '/pay/exchangelog',
      name: 'exchangelog',
      component: exchangelog,
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      describe: '兑换记录',
    },
    {
      path: '/pay/mmTransgerLog',
      name: 'mmTransgerLog',
      component: mmTransgerLog,
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      describe: '理财NGT兑换',
    },











// ===================
    {
      path: '/pay/alreadyfng',
      name: 'alreadyfng',
      component: alreadyfng,
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      describe: '已释放ngt转账',
    },

    {
      path: '/lock/ahistory',
      name: 'AHistory',
      component: AHistory,
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      describe: '释放历史',
    },

    {
      path: '/forget-pwd',
      name: 'ForgetPwd',
      component: ForgetPwd,
      meta: {
        clearToken: true, // 判断是否需要登录
      },
      describe: '忘记密码',
    },

    {
      path: '/reset-pwd',
      name: 'ResetPwd',
      component: ResetPwd,
      describe: '修改密码',
    },

    {
      path: '/reset-pay-pwd',
      name: 'ResetPayPwd',
      component: ResetPayPwd,
      describe: '修改支付密码',
    },

    {
      path: '/mine/info',
      name: 'UserInfo',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: UserInfo,
      describe: '用户头像',
    },
    {
      path: '/mine/icon',
      name: 'UserIcon',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: UserIcon,
      describe: '用户信息',
    },
    {
      path: '/mine/update-real-info',
      name: 'UpdateRealInfo',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: UpdateRealInfo,
      describe: '实名认证',
    },
    {
      path: '/mine',
      name: 'Mine',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: Mine,
      describe: '我的',
    },
    {
      path: '/mine/substitute',
      name: 'Substitute',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: Substitute,
      describe: '代出',
    },



    {
      path: '/invitation/friend',
      name: 'InvitationFriend',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: InvitationFriend,
      describe: '邀请好友',
    },

    {
      path: '/invitation/qrCode',
      name: 'InvitationQrCode',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: InvitationQrCode,
      describe: '邀请二维码',
    },

    {
      path: '/invitation',
      name: 'Invitation',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: Invitation,
      describe: '邀请',
    },

    {
      path: '/pay/financing',
      name: 'Financing',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: Financing,
      describe: '理财',
    },

    {
      path: '/pay/deposit-list',
      name: 'DepositList',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: DepositList,
      describe: '定存列表',
    },

    {
      path: '/pay/transfer-list',
      name: 'TransferList',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: TransferList,
      describe: '转账列表',
    },
    {
      path: '/pay/center',
      name: 'PayCenter',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: PayCenter,
      describe: '财务中心',
    },

    {
      path: '/pay/online',
      name: 'PayOnline',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: PayOnline,
      describe: '在线充值',
    },

    {
      path: '/pay/list',
      name: 'PayList',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: PayList,
      describe: '支付列表',
    },

    {
      path: '/product/info',
      name: 'ProductInfo',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: ProductInfo,
      describe: '产品详情',
    },

    {
      path: '/product/content',
      name: 'ProductContent',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: ProductContent,
      describe: '产品详情',
    },
    {
      path: '/product/paypwd',
      name: 'paypwd',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: productPay,
      describe: '支付密码',
    },
    {
      path: '/lock/lockCabin',
      name: 'lockcabin',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: lockCabin,
      describe: '锁仓',
    },
    {
      path: '/lock/hac',
      name: 'hac',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: hac,
      describe: 'HAC换购待释放',
    },
    {
      path: '/lock/cash',
      name: 'cash',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: cash,
      describe: '现金待释放',
    },
    {
      path: '/lock/repurchase',
      name: 'repurchase',
      meta: {
        requireAuth: true, // 判断是否需要登录
      },
      component: repurchase,
      describe: 'A换购待释放',
    }
  ]
})
